Tool Mentor: Setting Up the Test Environment in Rational TestFactoryTMPurposeThis tool mentor describes how to perform the steps to set up the TestFactory environment so that you can automatically generate test scripts for the application-under-test (AUT). Related Rational Unified Process activities:
OverviewBefore you can use TestFactory to automatically generate test scripts, you must set up the test environment. TestFactory generates scripts based on an ôapplication mapöùa hierarchical list of ôUI objectsö that represent the windows and controls in the user interface of the application-under-test (AUT). This Tool Mentor is applicable when running Windows 95/98/2000/NT 4.0. To set up the test environment in TestFactory:
1. Define the project to TestFactory and
instrument the AUT
The first time you open a project in TestFactory, you need to supply information about the project and the AUT. The main functional areas of TestFactory remain unavailable until you specify the project information. To measure code-based test coverage of an executed test script, the AUT must contain instrumentation pointsùcounters that tally the parts of the code that a test script executes. TestFactory uses information in the instrumented files to calculate code-based coverage data for both the test scripts that TestFactory generates and the Robot scripts that you play back from TestFactory.
2. Map the application-under-test
A well-developed application map is the foundation for generating scripts in TestFactory. The ôApplication Mapperöùthe process that creates the application mapùthoroughly explores the user interface of the application-under-test (AUT). Each window and control is examined and compared to known classes and subclasses, which are stored in the ôuser interface (UI) library.ö Based on the outcome of the comparison, the mapping process creates a UI object, which is an instance of the matched class, and places it in the application map. Every defined class in the UI library has a specific set of ôUI object propertiesö associated with it. When it creates a UI object, the Application Mapper assigns the object the set of properties associated with its class. These properties both identify the control in the AUT that the object represents, and inform TestFactory how to exercise the control during mapping and testing. If the AUT contains a logon dialog box that requires special input such as a user ID or a password, you must provide specific logon information to the Application Mapper. When mapping is complete, the information in the Mapping Summary report reflects the windows and controls in the AUT that TestFactory has mapped.
3. Review and refine the application
map
The first version of the application map may not be an accurate reflection of all the controls in the AUT. The application map may be incomplete or mapped UI objects may need reclassifying. A well-defined application map is critical to generating quality test scripts. TestFactory can test only the controls in the AUT that are represented by UI objects in the application map. By reviewing and refining the application map before you start testing, you can increase the scope and quality of the generated test scripts. You can review the application map by comparing the windows and controls that you see in the AUT with the UI objects in the application map. If you notice unmapped controls in the AUT, and if you want to test these controls, you need to determine and resolve the cause for each unmapped control.
|
Rational Unified
Process |